﻿using System;
using System.Collections.Generic;
using System.Data;
using Wei8808Cms.DAL;
using Wei8808Cms.Model;

namespace Wei8808Cms.BLL
{
    public class NewsBLL
    {
        private readonly NewsDAL _dal = new NewsDAL();

        public int GetCount(NewsQcInfo qcmodel)
        {
            return _dal.GetCount(qcmodel);
        }

        public DataSet GetPageList(NewsQcInfo qcmodel)
        {
            return _dal.GetPageList(qcmodel);
        }

        public bool Add(NewsInfo model)
        {
            return _dal.Add(model);
        }

        public bool Delete(List<NewsInfo> list)
        {
            return _dal.Delete(list);
        }

        public NewsInfo GetNewsInfo(string id)
        {
            return _dal.GetNewsInfo(id);
        }

        public bool Update(NewsInfo model)
        {
            return _dal.Update(model);
        }

        public bool UpdateField(string id, string strField)
        {
            return _dal.UpdateField(id, strField);
        }

        public DataTable GetModel()
        {
            return _dal.GetModel();
        }

        public List<NewsInfo> GetNewsList(string id, int pageIndex, int pageSize)
        {
            return _dal.GetNewsList(id, pageIndex, pageSize);
        }

        public int GetTotal(string id)
        {
            return _dal.GetTotal(id);
        }
    }
}
